package cn.cdeden.knowledge.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.*;
//import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
* @author Chen
* @date 2023-12-26
*/
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@TableName("sys_form_doc_temp")
public class SysFormDocTemp implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type= IdType.AUTO)
    private Long id;

//    @ApiModelProperty(value = "表单名称")
    private String formName;

//    @ApiModelProperty(value = "表单编码")
    private String formCode;

//    @ApiModelProperty(value = "表单JSON")
    private String formJson;

//    @ApiModelProperty(value = "表单图标")
    private String formIcon;

//    @ApiModelProperty(value = "状态")
    private String status;

    private String coverStorage;

//    @ApiModelProperty(value = "表单类型")
    private Integer formType;

    private Integer applyType;

//    @ApiModelProperty(value = "表单配置项")
    private String options;

//    @ApiModelProperty(value = "创建编号")
    @TableField(fill= FieldFill.INSERT)
    private String createId;

//    @ApiModelProperty(value = "创建者")
    @TableField(fill= FieldFill.INSERT)
    private String createBy;

//    @ApiModelProperty(value = "创建日期")
    @TableField(fill= FieldFill.INSERT)
    private Date createTime;

//    @ApiModelProperty(value = "更新编号")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private String updateId;

//    @ApiModelProperty(value = "更新者")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private String updateBy;

//    @ApiModelProperty(value = "更新时间")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private Date updateTime;

//    @ApiModelProperty(value = "删除编号")
    private String deleteId;

//    @ApiModelProperty(value = "删除者")
    private String deleteBy;

//    @ApiModelProperty(value = "删除时间")
    private Date deleteTime;

    private String deleteType;

    private String coverUrl;

    private Integer previews;

    private Long deptId;
    public void copyFrom(SysFormDocTemp source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
